package functii.trigonometrice;

import functii.Functie;

public class Tangenta extends Functie {

	public String toString() {
		if (fStang == null)
			System.exit(1);
		return concatTermeni(fStang.toString());
	}

	public static String ConcatTermeni(String aux1) {
		String aux;
		int nrP;
		nrP = aux1.charAt(0) == '(' ? 0 : 2;
		aux = "tg";
		if (nrP != 0)
			aux += "(";

		aux += aux1;

		if (nrP != 0)
			aux += ")";

		return aux;
	}
	
	public String concatTermeni(String aux1) {
		String aux;
		int nrP;
		nrP = aux1.charAt(0) == '(' ? 0 : 2;
		aux = "tg";
		if (nrP != 0)
			aux += "(";

		aux += aux1;

		if (nrP != 0)
			aux += ")";

		return aux;
	}

	/*
	public static double Calcul(double aux1) {

		return Math.tan(aux1);
	}

	public double calcul() {
		if (fStang == null)
			System.exit(1);
		return Calcul(fStang.calcul());
	}

	public double calculDerivata() {
		if (fStang == null)
			System.exit(1);
		return Impartit.Calcul(fStang.calculDerivata(), Ori.Calcul(Cos
				.Calcul(fStang.calcul()), Cos.Calcul(fStang.calcul())));
	}

	public String derivare() {
		if (fStang == null)
			System.exit(1);
		return Impartit.ConcatTermeni(fStang.derivare(), Ori.ConcatTermeni(Cos
				.concatTermeni(fStang.toString()), Cos.concatTermeni(fStang
				.toString())));
	}
*/
}
